#ifndef _WX_FSVOLUME_H_
#define _WX_FSVOLUME_H_

#include "wx/defs.h"

#if wxUSE_FSVOLUME

#include "wx/arrstr.h"

enum {
  wxFS_VOL_MOUNTED = 0x0001,
  wxFS_VOL_REMOVABLE = 0x0002,
  wxFS_VOL_READONLY = 0x0004,
  wxFS_VOL_REMOTE = 0x0008
};

enum wxFSVolumeKind {
  wxFS_VOL_FLOPPY,
  wxFS_VOL_DISK,
  wxFS_VOL_CDROM,
  wxFS_VOL_DVDROM,
  wxFS_VOL_NETWORK,
  wxFS_VOL_OTHER,
  wxFS_VOL_MAX
};

class wxFSVolumeBase {
  public:
    static wxArrayString GetVolumes( int flagsSet = wxFS_VOL_MOUNTED,
                                     int flagsUnset = 0 );
    static void CancelSearch();
    wxFSVolumeBase();
    wxFSVolumeBase( const wxString& name );
    bool Create( const wxString& name );
    bool IsOk() const;
    wxFSVolumeKind GetKind() const;
    int GetFlags() const;
    bool IsWritable() const { return !( GetFlags() & wxFS_VOL_READONLY ); }
    wxString GetName() const { return m_volName; }
    wxString GetDisplayName() const { return m_dispName; }
  protected:
    wxString m_volName;
    wxString m_dispName;
    bool m_isOk;
};

#if wxUSE_GUI

#include "wx/icon.h"
#include "wx/iconbndl.h" // only for wxIconArray

enum wxFSIconType {
  wxFS_VOL_ICO_SMALL = 0,
  wxFS_VOL_ICO_LARGE,
  wxFS_VOL_ICO_SEL_SMALL,
  wxFS_VOL_ICO_SEL_LARGE,
  wxFS_VOL_ICO_MAX
};

class wxFSVolume : public wxFSVolumeBase {
  public:
    wxFSVolume() : wxFSVolumeBase() { InitIcons(); }
    wxFSVolume( const wxString& name ) : wxFSVolumeBase( name ) { InitIcons(); }

    wxIcon GetIcon( wxFSIconType type ) const;

  private:
    void InitIcons();
    wxIconArray m_icons;
};

#else

typedef wxFSVolumeBase wxFSVolume;

#endif

#endif

#endif
